from fastapi import APIRouter, Form

formRoute=APIRouter()

#从Form标单中获取数据
@formRoute.post("/login",)
async def login(username: str=Form(...), password: str=Form(...)):
    return {"ps": f"input username: {username},input password: {password}"}